package com.kgc.scd.mapper;

import com.kgc.scd.bean.CouponInn;
import com.kgc.scd.bean.CouponUser;
import com.kgc.scd.bean.CouponUserInner;
import com.kgc.scd.bean.CouponUserInnerExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface CouponUserInnerMapper {
    long countByExample(CouponUserInnerExample example);

    int deleteByExample(CouponUserInnerExample example);

    int deleteByPrimaryKey(Integer innerId);

    int insert(CouponUserInner record);

    int insertSelective(CouponUserInner record);

    List<CouponUserInner> selectByExample(CouponUserInnerExample example);

    CouponUserInner selectByPrimaryKey(Integer innerId);

    int updateByExampleSelective(@Param("record") CouponUserInner record, @Param("example") CouponUserInnerExample example);

    int updateByExample(@Param("record") CouponUserInner record, @Param("example") CouponUserInnerExample example);

    int updateByPrimaryKeySelective(CouponUserInner record);

    int updateByPrimaryKey(CouponUserInner record);

    List<CouponUser> selectCouponjoinUserByUid(@Param("userId") String userId);

    CouponInn selectCouponInnByUidAndCouId(@Param("userId") String userId, @Param("couId") Integer couId);

    // 根据优惠券id，用户id，判断用户是否领取过，并且为使用
    CouponUserInner selectInnerByUidAndStatus0AndCouId(@Param("couId") Integer couId, @Param("uid") String uid);

}